package com.sumainfor.pc.market.controller.tenant;

import com.qiniu.util.Json;
import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.dao.RdPactMapper;
import com.sumainfor.pc.market.service.tenant.impl.TenPaIdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Meng
 * @ClassName TenPaIdController
 * @date 2019/12/11 21:57
 * @description: TODO
 */
@Controller
@RequestMapping("/tenant/key/TenPaId")
public class TenPaIdController {

    @Autowired
    TenPaIdService tenPaIdService;

    @Autowired
    RdPactMapper rdPactMapper;

    @ResponseBody
    @PostMapping("/upPaIdFlow")
    public JsonResult upPaIdFlow(@RequestBody Map<String,Object> params){
        JsonResult result = new JsonResult();
        Map<String,Object> map = new HashMap<>();
        map.put("cout",tenPaIdService.upPaIdFlow(params));
        return result.put(map);

    }


    @ResponseBody
    @GetMapping("/getPatIfFlPaysss")
    public JsonResult getPatIfFlPaysss(@RequestParam Map<String,Object> params){
        JsonResult result = new JsonResult();
        Map<String,Object> map = new HashMap<>();
        map.put("coutPaId",rdPactMapper.getPatIfFlPaysss(params));
        return result.put(map);

    }


}
